package com.ss.android.account.v2.c;

import android.app.Activity;
import com.bytedance.frameworks.b.a.ComponentsManifest;
import com.ss.android.account.bus.event.g;
import com.ss.android.account.v2.b.f;
import com.ss.android.common.app.permission.PermissionsManager;
import com.ss.android.messagebus.SubscriptionRouter;

final class b extends f {
    private final a c;
    private final String b;

    b(a arg1, String arg2) {
        this.c = arg1;
        this.b = arg2;

    }

    public final void a(int arg3, String arg4, Object arg5) {
        if(this.c.c()) {
            ((com.ss.android.account.d.d)this.c.a).d();
        }

        this.c.a(this.b, arg3, arg4, arg5);
    }

    public final void a(Object arg8) {
        if(this.c.c()) {
            ((com.ss.android.account.d.d)this.c.a).d();
        }

        this.c.g();
        a v1 = this.c;
        String v2 = this.b;
        if(!ComponentsManifest.findComponent(com.ss.android.account.v2.bb.class).b().a() || !(v1.b instanceof Activity)) {
            v1.a(v2, ((com.ss.android.account.b.k.k$a)arg8));
            SubscriptionRouter.c(new g());
        }
        else {
            PermissionsManager.getInstance().requestPermission((Activity) v1.b, new String[]{"android.permission.READ_CONTACTS"}, new c(v1, v2, ((com.ss.android.account.b.k.k$a)arg8)));
        }
    }
}

